<table width="200" height="5" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td></td>
  </tr>
</table>

<table width="1000" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="ffeac7">
  <tr>
    <td height="91" align="center" valign="top" bgcolor="fffbed"><table width="98%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="30" align="left" class="tit">今日十大名菜</td>
      </tr>
    </table>
      <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <?php 
          foreach ($recommFood as $v):
          	$foodInfo = FoodPeer::retrieveByPK($v->getObjectId());
          	if($foodInfo):
          	$imgStr = $foodInfo->getImg();
          	$imgsArr= explode('|',$imgStr); 
          ?>
          <td align="center">
          	<a href="/food/intro?id=<?php echo $foodInfo->getId()?>">
          		<img src="<?php echo SITE_URL.'uploads/'.$imgsArr['0']?>" width="80" height="80" border="0" class="img" />
          	</a><br>
          	</td>
          	<?php endif;?>
          <?php endforeach; ?>
        </tr>
        <tr>
         <?php 
          foreach ($recommFood as $v):
          	$foodInfo = FoodPeer::retrieveByPK($v->getObjectId());
          	if($foodInfo):
          ?>
          <td align="center" height="35">
          	<a href="/food/intro?id=<?php echo $foodInfo->getId()?>" class="imgword"><?php echo $foodInfo->getName()?></a><br />
          </td>
         	<?php endif;?>
          <?php endforeach; ?>
        </tr>
    </table></td>
  </tr>
</table>
<table width="200" height="5" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td></td>
  </tr>
</table>
<table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="3%" background="<?php echo SITE_URL?>img/made/made_r5_c3.jpg"><img src="<?php echo SITE_URL?>img/made/made_r5_c2.jpg" width="6" height="33" /></td>
    <td width="81%" background="<?php echo SITE_URL?>img/made/made_r5_c3.jpg" class="weizhi">您当前所在的位置：
    	<a href="<?php echo SITE_URL?>" class="weizhi">首页</a> &gt;&gt; 
    	<a href="/scene/intro?id=<?php echo $scene->getId();?>"><?php echo $scene->getName()?></a> &gt;&gt; 
    	美食</td>
    <td width="10%" background="<?php echo SITE_URL?>img/made/made_r5_c3.jpg" class="login">&nbsp;</td>
    <td width="6%" align="right" background="<?php echo SITE_URL?>img/made/made_r5_c3.jpg"><img src="<?php echo SITE_URL?>img/made/made_r5_c23.jpg" width="9" height="33" /></td>
  </tr>
</table>
<table width="200" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td  height="8"></td>
  </tr>
</table>
<table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="24%" height="718" valign="top"><table width="231" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td><img src="<?php echo SITE_URL?>img/dp/dianp_r2_c2.jpg" width="230" height="8" /></td>
      </tr>
    </table>
      <table width="230" border="0" cellspacing="0" cellpadding="0">

        <tr>
          <td height="34" valign="top" background="<?php echo SITE_URL?>img/dp/dianp_r5_c2.jpg"><table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td align="center">
              <div id="mapObj" class="view" style="width:200px;height:137px"></div> 
				<SCRIPT LANGUAGE="JavaScript">
				  	//设置地图初始化参数对象
				  	var mapOptions = new MMapOptions();
				  	mapOptions.mapId = "fmptest";
				  	mapOptions.zoomLevel = 10;
				  	//设置中心点为北京
				  	mapOptions.center = new MLatLng(<?php echo $scene->getXy()?>);
				  	//创建地图对象
				  	var mapObj = new MMap("mapObj", mapOptions);
				
					var points = new Array(); 
				
					var pointStyle = new MStyle(); 
					pointStyle.lineColor = 0xff0000; 
					pointStyle.lineSize = 3; 
					pointStyle.fillColor = 0xddaabb; 
					pointStyle.fillOpacity = 50; 
					pointStyle.labelColor = 0x00ff00; 
					pointStyle.textContent = '';
				
					//循环此部分即可输出多个点.pointStyle.textContent设置的是每个图片在鼠标移上去后显示的详细信息，可以不管.
					<?php
					foreach ($eateryIds as $key => $v):
						$eateryInfo = EateryPeer::retrieveByPK($v['0']);
						if($eateryInfo):
					?>
					pointStyle.textContent = "<font color='#ff0000'><?php echo $eateryInfo->getName()?></font><br><?php echo $eateryInfo->getDes()?>"; 
					points.push(new MPointOverlay(new MLatLng(<?php echo $eateryInfo->getXy()?>), "<?php echo $eateryInfo->getName()?>", pointStyle, "200<?php echo $key+1?>")); 
						<?php endif;?>
					<?php endforeach;?>					
					
					mapObj.drawPoints(points, true); 
				</script>
              </td>
            </tr>
            <tr>
              <td height="15"></td>
            </tr>
          </table></td>
        </tr>
      </table>
      <table width="230" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><img src="<?php echo SITE_URL?>img/dp/dianp_r14_c2.jpg" width="230" height="10" /></td>
        </tr>
      </table>
      <table width="231" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="5"></td>
        </tr>
      </table>     
	   <table width="234" border="0" cellspacing="0" cellpadding="0">
         <tr>
           <td><img src="<?php echo SITE_URL?>img/photo/jq_photo_r15_c1.jpg" width="234" height="7" /></td>
         </tr>
       </table>
	   <table width="234" border="0" cellspacing="0" cellpadding="0">
         <tr>
           <td align="center" background="<?php echo SITE_URL?>img/photo/jq_photo_r16_c1.jpg"><table width="90%" border="0" cellspacing="0" cellpadding="0">
               <tr>
                 <td width="100%" height="30" align="left" class="tit">网友最新做法</td>
               </tr>
               <?php 
               foreach ($methods as $v): 
               	$userInfo = getUserById($v->getUserId());
               	$foodInfo = FoodPeer::retrieveByPK($v->getFoodId());
               ?>
               <tr>
                 <td height="25" align="left" class="word">唐客
                 	<span class="yh"><?php echo $userInfo['username']?></span>对
                 	<span class="yh"><?php echo $foodInfo->getName();?></span>的新做法</td>
               </tr>
               <?php endforeach;?>
           </table></td>
         </tr>
       </table>
	   <table width="234" border="0" cellspacing="0" cellpadding="0">
         <tr>
           <td><img src="<?php echo SITE_URL?>img/photo/jq_photo_r18_c1.jpg" width="234" height="6" /></td>
         </tr>
       </table>
	   <table width="231" border="0" cellspacing="0" cellpadding="0">
         <tr>
           <td height="5"></td>
         </tr>
       </table>
	   <table width="234" border="0" cellspacing="0" cellpadding="0">
         <tr>
           <td><img src="<?php echo SITE_URL?>img/photo/jq_photo_r15_c1.jpg" width="234" height="7" /></td>
         </tr>
       </table>
	   <table width="234" border="0" cellspacing="0" cellpadding="0">
         <tr>
           <td align="center" background="<?php echo SITE_URL?>img/photo/jq_photo_r16_c1.jpg"><table width="90%" border="0" cellspacing="0" cellpadding="0">
               <tr>
                 <td height="30" colspan="2" align="left" class="tit">网友评论</td>
               </tr>
               <?php 
               foreach ($comments as $v):
               	$userInfo = getUserById($v->getUserId());
               ?>
               <tr>
                 <td width="69%" height="25" align="left" class="word"><?php echo substr($v->getContent(),0,30);?></td>
                 <td width="31%" align="left" class="yh"><?php echo $userInfo['username']?></td>
               </tr>
               <?php endforeach;?>
           </table></td>
         </tr>
       </table>
	   <table width="234" border="0" cellspacing="0" cellpadding="0">
         <tr>
           <td><img src="<?php echo SITE_URL?>img/photo/jq_photo_r18_c1.jpg" width="234" height="6" /></td>
         </tr>
       </table>
	   <table width="231" border="0" cellspacing="0" cellpadding="0">
         <tr>
           <td height="5"></td>
         </tr>
       </table>
	   <table width="229" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="180" valign="top" background="<?php echo SITE_URL?>img/dp/dianp_r16_c3.jpg"><table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td height="35" colspan="2" align="left" class="login">最好吃的人</td>
            </tr>
            <?php 
            	foreach ($hotUsers as $v): 
            		if($v):
            ?>
            <tr>
              <td width="21%" height="25" align="left"><a href="#" class="login"></a></td>
              <td width="79%" align="left" class="weizhi"><?php echo $v->getUsername();?></td>
            </tr>
            	<?php endif; ?>
            <?php endforeach; ?>
          </table></td>
        </tr>
      </table>
    </td>
    <td width="76%" align="center" valign="top"><table width="746" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="35">&nbsp;</td>
        <td width="144">
        	<a href="/scene/food?id=<?php echo $id?>&type=hot">
        		<img src="<?php echo SITE_URL?>images/jqms_r2_c3.jpg" width="123" height="29" />
        	</a>	
        </td>
        <td width="146">
        	<a href="/scene/food?id=<?php echo $id?>&type=new">
        		<img src="<?php echo SITE_URL?>images/jqms_r1_c1.jpg" width="123" height="30" />
        	</a>
        </td>
        <td width="141" >
        	<a href="/scene/food?id=<?php echo $id?>&type=all">
        		<img src="<?php echo SITE_URL?>images/jqms_r2_c5.jpg" width="123" height="29" />
        	</a>
        </td>
        <td width="280">&nbsp;</td>
      </tr>
    </table>
    <table width="746" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td><img src="<?php echo SITE_URL?>img/made/made_r30_c10.jpg" width="746" height="11" /></td>
      </tr>
    </table>
      <table width="746" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td align="center" valign="top" background="<?php echo SITE_URL?>img/made/made_r32_c10.jpg"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td align="center">
      	<div>
          	<?php 
          	foreach ($foodPage as $k => $v): 
          		$foodInfo = FoodPeer::retrieveByPK($v);
          		$userInfo = getUserById($foodInfo->getUserId());
          		if($foodInfo):
          	?>
          	<div style="float:left;width:150px;margin-left:30px;margin-top:25px;">
          		<?php
          			$imgsArray = explode('|',$foodInfo->getImg());
          		?>
          		<?php $imgSize = getimagesize(SITE_URL.'uploads/'.$imgsArray['0']);?>
          		<img src="<?php 
          			echo SITE_URL.'uploads/'.$imgsArray['0'];
          		?>" 
          		<?php
          			if($imgSize['0'] > 130){
          				echo 'width="130"';
          			}
          			if($imgSize['1'] > 85){
          				echo 'height="85"';
          			}
          		?> style="margin-top:5px;">
          		<p style="margin-top:5px;"><?php echo $foodInfo->getName()?></p>
          		<p style="margin-top:5px;" class="yh">由<?php echo $userInfo['username']?>发现</p>
          	</div>
          		<?php endif;?>
          	<?php endforeach; ?>
          </div>
      <table width="684" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="684" height="25" align="right" class="word">
          	当前显示<?php echo sizeof($foodIdArray)?>个美食中的
          	<?php
          		echo (($page-1)*$perPage > 1) ? ($page-1)*$perPage : 1;
          	?>
          	~
          	<?php
          		echo ($page*$perPage <= sizeof($foodIdArray)) ?  $page*$perPage : sizeof($foodIdArray);
          	?>
          	个，
          	<span class="yh">
          	<a href="/scene/food?id=<?php echo $id?>&type=<?php echo $type?>&page=<?php echo ($page-1)>1 ? ($page-1) : 1?>">上一页</a>
          		<?
          		for($i=1;$i<=$totalPages;$i++){
          			if($i>5){
          				break;
          			}
          			echo '<a href="/scene/food?id='.$id.'&type='.$type.'&page='.$i.'">'.$i.'</a>&nbsp;';
          		}
          		?>
          	<a href="/scene/food?id=<?php echo $id?>&type=<?php echo $type?>&page=<?php echo ($page+1)<=$totalPages ? ($page+1) : $totalPages?>">下一页</span> 
          	</td>
        </tr>
      </table>
      </td>
  </tr>
</table>
          </td>
        </tr>
      </table>
      <table width="746" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><img src="<?php echo SITE_URL?>img/made/made_r39_c10.jpg" width="746" height="9" /></td>
        </tr>
      </table>
      <table width="746" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="8"></td>
        </tr>
      </table>
      <table width="746" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="8"><img src="<?php echo SITE_URL?>img/js/jq_index_r1_c1.jpg" width="746" height="9" /></td>
        </tr>
      </table>
      <table width="746" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="51" align="center" valign="top" background="<?php echo SITE_URL?>img/js/jq_index_r3_c1.jpg"><table width="95%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="83%" height="30" align="left" class="tit">最受欢迎的店铺</td>
              <td width="17%" class="titsmall">我也发现一个</td>
            </tr>
          </table>
            <table width="95%" border="0" cellpadding="0" cellspacing="0">
              <tr>
              	<?php 
              		foreach ($eaterys as $v):
              			$eateryInfo = EateryPeer::retrieveByPK($v->getObjectId());
              			if($eateryInfo):
              	?>
                <td><img src="<?php echo SITE_URL.'uploads/'.$eateryInfo->getImg();?>" width="130" height="85" class="img" /></td>
                	<?php endif; ?>
                <?php endforeach; ?>
              </tr>
              <tr>
              	<?php 
              		foreach ($eaterys as $v): 
              			$eateryInfo = EateryPeer::retrieveByPK($v->getObjectId());
              			if($eateryInfo):
              	?>
                <td height="20" align="center" class="word"><?php echo $eateryInfo->getName();?></td>
                	<?php endif; ?>
                <?php endforeach; ?>
              </tr>
            </table></td>
        </tr>
      </table>
      <table width="746" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="8"><img src="<?php echo SITE_URL?>img/js/jq_index_r5_c1.jpg" width="746" height="6" /></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
</body>
</html>
